import { Module } from '@nestjs/common';
import { JwtModule } from '@nestjs/jwt';
import { LoginController } from "./login.controller";
import { LoginService } from "./login.service";

@Module({
    imports: [
        JwtModule.registerAsync({
            useFactory: () => {
                const expiresIn = 60 * 60 * 24;
                return {
                    secret: 'secretKey',
                    signOptions: { expiresIn },
                }
            }
        })
    ],
    controllers: [LoginController],
    providers: [LoginService],
    exports: [LoginService]
})

export class LoginModule {};